package com.banciyuan.bcywebview.biz.webdetail;

import com.banciyuan.bcywebview.base.factory.TimelineFactory;
import com.banciyuan.bcywebview.biz.detail.noveldetail.newnoveldetail.NovelComplexActivity;

import de.greenrobot.daoexample.model.DetailType;

/**
 * Created by hy on 2015/5/8.
 */
public class WorkDetailActivity4WebSite extends NovelComplexActivity {

    private String from_path;


    @Override
    protected void initArgs() {
        super.initArgs();
        try {
            from_path = getIntent().getData().getPath();
            setWebParmas();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    private void setWebParmas() {
        mDetailType = new DetailType();
        String[] paths = from_path.split("/");
        try {
            if (paths[1].equals("novel")) {
                mDetailType.setTimelineType(TimelineFactory.TIMELINE_TYPE_WRITER);
                mDetailType.setRp_id(paths[paths.length - 1]);
                mDetailType.setWp_id(paths[paths.length - 2]);
            }
            complexHelper.setmDetailType(mDetailType);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
